/**
* @describe 
* @author 游金宇(KM)
* @date 2024-09-12 11:35:02
*/

import { Manager } from '@shimotsuki/core';
import { COSAPI } from './cos'
import { LoginAPI } from './login'
import { UserAPI } from './user'

// 兼容ky库里的 Object.hasOwn
import 'core-js/es/object/index.js'


declare module '@shimotsuki/core' {
    interface Manager {
        /**API 管理 */
        api: API;
    }
}

export class API {

    cos: COSAPI
    login: LoginAPI
    user: UserAPI

    constructor(cat: Manager) {
        this.cos = new COSAPI(cat)
        this.login = new LoginAPI(cat)
        this.user = new UserAPI(cat)
    }


}
